<{Tinclude "commom/admin_header"}>
 <section id="container" >
      <link href="<?php echo CSS_PATH;?>bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="<?php echo CSS_PATH;?>font-awesome.css" rel="stylesheet">
<script type="text/javascript" src="<?php echo JS_PATH;?>bootstrap-wysiwyg.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH;?>jquery.hotkeys.js"></script>
      <!--顶部-->
      <{Tinclude"commom/admin_inner_header"}>
      <!--顶部-->
      
       <{Tinclude"commom/admin_left_menu"}>
       
       <section id="main-content">
          <section class="wrapper">
          <h3><i class="<{if $___menuinfo["iconclass"]}><{$___menuinfo["iconclass"]}><{else}>fa fa-list-ul<{/if}>"></i><{$___menuinfo["base_name"]}></h3>
                <div class="row mt">
                    <div class="col-md-12">
                       <div class="form-panel">  
                           <div class="col-md-12">
                           <form class="form-inline" role="form" action="<{echo Common::RewriteUrl($jp_arg["c"],$jp_arg["a"]);}>"  method="post">
 <input type="hidden" name="<?php echo $jp_arg['c'];?>/<?php echo $jp_arg['a'];?>"/>
 <div class="form-group">
    <label for="base_name" class="sr-only">订单号</label>
    <input type="text" class="form-control" value="<?php if(isset($jp_arg['order_no']))echo $jp_arg['order_no'];?>" name="order_no" id="base_name" placeholder="订单号">
  </div>
  <div class="form-group">
    <label for="base_name" class="sr-only">收货人</label>
    <input type="text" class="form-control" value="<?php if(isset($jp_arg['user_name']))echo $jp_arg['user_name'];?>" name="user_name" id="user_name" placeholder="收货人">
  </div>
 <button type="submit" name="search" class="btn btn-default">搜索</button>
</form>
              
                           </div>              
                           
                            <section id="no-more-tables">        
                           <table class="table table-striped table-condensed table-hover cf">
      <thead class="cf">
        <tr>
          <th class="text-center">订单号</th>
          <th class="text-center">销售重量</th>
          <th class="text-center">价格</th>
          <th class="text-center">收货人姓名</th>
          <th class="text-center">下单时间</th>
           <th class="text-center">订单状态</th>
          <th class="text-center">操作</th>
        </tr>
      </thead>
      <tbody>
           <?php if(isset($list)&&$list){?>
          <?php foreach($list as $val){?>
          <tr>
              <td class="text-center" data-title="订单号"><?php echo $val["order_no"];?></td>
              <td class="text-center" data-title="销售重量"><?php echo $val["sale_weight"];?>斤</td>
              <td class="text-center" data-title="价格"><?php echo $val["sale_price"];?>元</td>
              <td class="text-center" data-title="收货人姓名"><?php echo $val["user_name"];?></td>
              <td class="text-center" data-title="下单时间"><?php echo date("Y-m-d",$val["create_time"]);?></td>
               <td class="text-center" data-title="订单状态"><?php if($val["status"]==1)echo "正常";else echo "作废";?></td>
              <td class="text-center" data-title="操作">
                  <div class="btn-group">  
                  <a class="btn btn-success btn-xs" href="<{echo Common::RewriteUrl("order","edit","&id=".$val["id"]);}>" ><span class="glyphicon glyphicon-eye-open"></span></a>
                  <button type="button" class="btn btn-primary zuofei btn-xs" data-orderid="<?php echo $val["id"];?>"><span class="glyphicon glyphicon-trash"></span></button>
                  </div>
              </td>
          </tr>
          <?php }?>
          <?php }?>
      </tbody>
    </table>
                            </section>                 
                           
                       </div>
                    </div>
                </div>
          </section>
       </section>
 </section>
<script>
    $(".zuofei").click(function(){
        var orderid=$(this).data("orderid");
        if(window.confirm("确定要作废改订单吗?")){
        $.post("<{echo Common::RewriteUrl("order","public_ajax_zuofei");}>",{"oid":orderid},function(data){
            if(data.status==1){
                alert("订单已作废!");
                window.location.reload();
            }
        },"json");
    }
    });
</script>
<{Tinclude"commom/admin_footer"}>